package com.tanhua.dubbo.api;

import com.tanhua.model.mongo.Comment;
import com.tanhua.model.mongo.Movement;
import com.tanhua.model.vo.PageResult;

import java.util.List;

public interface MovementApi {
    //发布动态
    String publish(Movement movement);

    //分页查看动态信息
    PageResult findByUserId(Long userId, Integer page, Integer pagesize);
    //好友动态查询
    List<Movement> findmovements(Long userId, Integer page, Integer pagesize);

    //随机分配10条动态
    List<Movement> randomMovements(Integer pagesize);

    //推荐好友动态
    List<Movement> findmovementsById(List<Long> pids);

    //单条动态查询
    Movement findByid(String movementId);

    //根据id动态分页查询
    List<Movement> findMessages(Integer page, Integer pagesize, Long uid, Integer state);

    //更新动态的状态
    void update(String movementId, int state);

    //通过条件查找动态的所有评论
//    List<Comment> findComments(Integer page, Integer pagesize, String messageID);
}
